import sys

# 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)]
print(sys.version)

print("== " * 8)

from math import factorial

print(factorial(5))  # 120

print("== " * 8)


def local():
    m = 7
    print(m)  # 7


m = 5
local()
print(m)  # 5

print("== " * 8)


def enclosing_func():
    m = 13

    def local():
        # m=12
        # 13 Print from the local scope
        print(m, "Print from the local scope")

    local()


m = 5
# 5 Print from the global scope
print(m, "Print from the global scope")


enclosing_func()
print("== " * 8)


class Bike:
    def __init__(self, colour, frame_material):
        self.colour = colour
        self.frame_material = frame_material

    def brake(self):
        print("Braking!")


red_bike = Bike("Red", "Carbon fiber")
blue_bike = Bike("Blue", "Steel")

print(red_bike.colour)
print(red_bike.frame_material)

print(blue_bike.colour)
print(blue_bike.frame_material)

red_bike.brake()  # 'Braking!'
